let express = require('express');
let path = require('path');
let app = express();
// 开放静态资源
app.use('/public/', express.static(path.join(__dirname, './public/')));
app.use('/node_modules/', express.static(path.join(__dirname, './node_modules/')));

// 配置模板引擎
app.engine('html', require('express-art-template'));
app.set('views', path.join(__dirname, './')); // 默认就是./views目录，这样写方便以后修改

app.get('/', function (req, res) {
  res.render('index.html', {
      name: 'Cyan'
  });
})

app.listen(3000, function () {
  console.log('app is running in 3000');
})